<?php
/**
 * 
 * @authors yutent (yutent@doui.cc)
 * @date    2015-06-30 10:19:02
 *
 */


class Index {

    private $view;
    private static $tpl = 'index/views/';

	function __construct(){
        global $_G;

        $this->view = new Do_View;

        $_G['route']->get('/index/:id', function($model){

            if(method_exists($this, $model)){
                call_user_func([$this, $model]);
                exit;
            }else{
                _404();
            }
            
        });

        
    }


    private function index(){
        $this->view->render(self::$tpl . 'index.tpl');
    }




}